//UNO房卡模式
module.exports.createRoom = function(roomId,channelService,GameRemote) {
	var basic = require("./UNO.js").createRoom
	var room = new basic(roomId,channelService,GameRemote)
	//添加解散模块
	var dissolution = require("./basic/dissolution.js")
	dissolution.call(room)
	room.roomMode = "UNORoom"
	console.log("UNORoom!!!!")
	//设置游戏信息
	room.setBeforeInfo = function(info) {
		if(info.gameNumber && typeof(info.gameNumber) == "number" && info.gameNumber > 0){
			room.maxGameNumber = info.gameNumber
		}
	}
	//游戏结束保存战绩
	room.gameOverBefore = function() {
		if(room.gameNumber > 0){
			GameRemote.app.rpc.db.UNO.saveRoomHistory(null,room.getRoomData(),function(){})
		}
		clearTimeout(room.playTimer)
		room.gameOver()
	}
	return room
}